package com.xiaomiMall.mange.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Order {

    /** 我的订单id */
    private Long id;

    /** 用户id */
    private Long userId;

    /** 订单号码 */
    private Long orderNumber;

    /** 商品id */
    private Long prodId;

    /** 商品数量 */
    private int amount;

    /** 商品总价 */
    private float totalPrice;

    /** 购买时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date timeBuying;

    /** 快递地址的id */
    private Long addressId;

    /** 交易订单状态 */
    private int orderStatus;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(Long orderNumber) {
        this.orderNumber = orderNumber;
    }

    public Long getProdId() {
        return prodId;
    }

    public void setProdId(Long prodId) {
        this.prodId = prodId;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public float getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(float totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Date getTimeBuying() {
        return timeBuying;
    }

    public void setTimeBuying(Date timeBuying) {
        this.timeBuying = timeBuying;
    }

    public Long getAddressId() {
        return addressId;
    }

    public void setAddressId(Long addressId) {
        this.addressId = addressId;
    }

    public int getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(int orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Order() {
    }

    public Order(Long id, Long userId, Long orderNumber, Long prodId, int amount, float totalPrice, Date timeBuying, Long addressId, int orderStatus) {
        this.id = id;
        this.userId = userId;
        this.orderNumber = orderNumber;
        this.prodId = prodId;
        this.amount = amount;
        this.totalPrice = totalPrice;
        this.timeBuying = timeBuying;
        this.addressId = addressId;
        this.orderStatus = orderStatus;
    }

    public Order(Long userId, Long prodId, int amount, float totalPrice, Long addressId) {
        this.userId = userId;
        this.prodId = prodId;
        this.amount = amount;
        this.totalPrice = totalPrice;
        this.addressId = addressId;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", orderNumber=" + orderNumber +
                ", prodId=" + prodId +
                ", amount=" + amount +
                ", totalPrice=" + totalPrice +
                ", timeBuying=" + timeBuying +
                ", addressId=" + addressId +
                ", orderStatus=" + orderStatus +
                '}';
    }
}
